package com.example.simple.controller;

import com.example.simple.pojo.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class TestController {
    @GetMapping("/test1")
    public String test1(){
        return "test1";
    }
    @GetMapping("/test2")
    public User test2(String name){
        User user = new User();
        user.setName(name);
        user.setAge(12L);
        return user;
    }
}
